<template>
    <el-aside width="256px">
        <ul class="coupon-nav" v-if="index == 0">
            <li class="active">
                <router-link to="/coupon/index">
                    <svg-icon icon-class="nav-quan-active" style="vertical-align: middle"></svg-icon>{{$t('navbar.coupons')}}
                </router-link>
            </li>
            <li>
                <div @click="goMgm">
                    <svg-icon icon-class="nav-prize"></svg-icon>{{$t('coupon.nav1')}}<svg-icon icon-class="arrow"></svg-icon>
                </div>
            </li>
        </ul>
        <ul class="coupon-nav" v-else>
            <li>
                <router-link to="/coupon/index">
                    <svg-icon icon-class="nav-quan" style="vertical-align: middle"></svg-icon>{{$t('navbar.coupons')}}<svg-icon icon-class="arrow"></svg-icon>
                </router-link>
            </li>
            <li class="active">
                <div @click="goMgm">
                     <svg-icon icon-class="nav-prize-active"></svg-icon>{{$t('coupon.nav1')}}
                </div>
            </li>
        </ul>
    </el-aside>

</template>

<script>

    export default {
        props: {
            index: {
                type: Number,
                default: 0
            }
        },
        data() {
        return {
        }
    },
    created() {
    },
    methods: {
        goMgm() {
            window.location.href = '/?_='+new Date()*1+'#/coupon/mgm'
        }
    }
    }
</script>
<style scoped>
    a {
        color: inherit;
    }
    p {
        margin: 0;
    }
    li {
        list-style: none;
    }
    .coupon-nav {
        padding: 0;
        margin: 0;
        background: #ffffff;
    }

    .el-aside {
        border-right: 1px solid #EBEDF8;
        background: #ffffff;
    }
    .coupon-nav li {
        line-height: 48px;
        height: 48px;
        font-size: 16px;
        color: #212121;
        cursor: pointer;
    }
    .coupon-nav a {
        display: block;
    }
    .coupon-nav svg {
        margin: 0 8px 0 12px;
    }
    .coupon-nav .active {
        color: #3DBDB6;
        background: #F5F5F5;
    }
</style>
<style type="text/css">


</style>

